#pragma once
#include "Runtime/BattleFirePrefix.h"
namespace Alice{
    class GenericPlatformMisc
    {
    public:
        static void MemoryBarrier(){}
        static void SetThreadName( const char* name ){}
        FORCEINLINE static void Prefetch(const void* Ptr)
        {
#if PLATFORM_CPU_X86_FAMILY
            _mm_prefetch(static_cast<const char*>(Ptr), _MM_HINT_T0);
#elif PLATFORM_CPU_ARM_FAMILY
#if defined(_MSC_VER)
            __prefetch(Ptr);
#else
            __asm__ __volatile__("prfm pldl1keep, [%[ptr]]\n" ::[ptr] "r"(Ptr) : );
#endif
#else
#endif
        }
    };
}